package com.antovita.militarymonkey.screens;

import com.antovita.militarymonkey.MyGdxGame;
import com.antovita.militarymonkey.input.QuitInput;
import com.antovita.militarymonkey.service.Textures;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.math.Rectangle;

public class QuitMenuScreen extends MenuScreen {

	private Sprite yes;
	private Sprite no;
	
	public QuitMenuScreen(MyGdxGame game) {
		super(game);
		this.input = new QuitInput(game);
	}

	@Override
	public void create() {
		Textures.loadSprites("data/quit.png", 2, 1);
		yes = new Sprite(Textures.getTextureRegions("data/quit.png")[0]);
		no = new Sprite(Textures.getTextureRegions("data/quit.png")[1]);
		yes.setSize(WIDTH * 0.8f, HEIGHT * 0.2f);
		yes.setPosition(WIDTH * 0.1f, HEIGHT * 0.5f);
		no.setSize(WIDTH * 0.8f, HEIGHT * 0.2f);
		no.setPosition(WIDTH * 0.1f, HEIGHT * 0.5f - no.getHeight());
	}
	
	@Override
	public void render() {
		super.render();
		batch.begin();
		yes.draw(batch);
		no.draw(batch);
		batch.end();
	}
	
	public Rectangle getYes() {
		return yes.getBoundingRectangle();
	}
	
	public Rectangle getNo() {
		return no.getBoundingRectangle();
	}

}
